package edu.xlh.travel.dao;

import edu.xlh.travel.pojo.CheckingTask;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface CheckingTaskDao extends JpaRepository<CheckingTask,String>, JpaSpecificationExecutor<CheckingTask> {
    @Transactional
    @Modifying
    @Query(value = "update CheckingTask set delFlag =?2 where id =?1")
    void updateCheckingTaskDelFlagByCheckingTaskId(String taskId, String delFlag);

    @Transactional
    @Modifying
    @Query(value = "update CheckingTask set delFlag =?2 where orderId =?1")
    void updateCheckingTaskDelFlagByOrderId(String orderId, String delFlag);
}
